Array.prototype.my_join=function(expr=','){
    let str=''
    for(let i=0;i<this.length;i++){
        if(i==this.length-1){
            str+=this[i]
        }else{
            str+=this[i]+expr//分隔数组
        }
        
    }
    return str
}
let arr=[1,2,4,5,7,8]
let result = arr.my_join(',')
console.log(result)